<template>
  <button :open-type="openType" plain="true" class="container" @getuserinfo="getUserInfo">
    <img class="image" :src="imgSrc" :style="imgStyle" />
  </button>
</template>

<script>
export default {
  name: 'ImgBtn',
  props: {
    openType: String,
    imgSrc: String,
    imgStyle: {
      type: String,
      default: 'width: 40rpx;height: 40rpx;'
    }
  },
  methods: {
    getUserInfo (e) {
      this.$emit('getUserInfo', e.mp.detail.userInfo)
    }
  }
}
</script>

<style lang="stylus" scoped>
  .container
    padding 0
    border none
    .image
      width 40rpx
      height 40rpx
</style>
